<template>
	<view class="content">
		{{ userName }}
	</view>
</template>

<script>
import { dg_HomeTemplate } from '../../api/home.js'
import { mapState, mapMutations } from 'vuex'

export default {
	computed: {
		...mapState(['userName', 'hasLogin'])
	},
	data() {

		return {
			
		}
	},
	onLoad() {
		this.getUserinfo()

	},
	methods: {
		...mapMutations(['login','loginOut']),
		async getUserinfo() {
			let res = await dg_HomeTemplate()
			console.log(res)
		}
	}
}
</script>

<style></style>
